import bus from '@/bus'
import { renderButton } from '@/util';
import dayjs from 'dayjs'
const startReportDate = dayjs().format('YYYY-MM') + '-01' + ' 00:00:00'
const endReportDate = dayjs().format('YYYY-MM-DD') + ' 23:59:59'
let data = {
  status: 'pass',
  totalItem: 0,
  pageSize: window.$pageSize,
  currentPage: 1,
  departments: [],
  distributors: [],
  form: {
    operatorName: '',
    storeMaintainerName: '',
    date: [],
    storeId: null,
    officeId: '',
    distributorIds: null,
    depId: '',
  },
  columns: [{
        title: '科室',
        key: 'officeName',
        align: 'left',
        minWidth: 100
    }, {
        title: '地区',
        key: 'depName',
        align: 'left',
        minWidth: 150
    }, {
        title: '经销商',
        key: 'distributorName',
        align: 'left',
        minWidth: 200
    }, {
        title: '门店名称',
        key: 'storeName',
        align: 'left',
        minWidth: 200
    }, {
        title: '门店类型',
        key: 'storeTypeName',
        align: 'left',
        minWidth: 150
    }, {
        title: '门店联系人',
        key: 'storeMaintainerName',
        align: 'left',
        minWidth: 150
    }, {
        key: 'storePhone',
        align: 'left',
        minWidth: 150,
        renderHeader: (h, params) => {
          let oDiv = h('div', [
            h('span', '登录手机'),
            h('Icon', {
              props: {
                type: 'ios-help-circle'
              }
            })
          ])
          return h('Tooltip', {
            style: {
              cursor: 'pointer'
            },
            props: {
              'max-width': "200",
              transfer: true,
              content: '门店登录手机'
            }
          }, [oDiv])
        }
    }, {
        title: '签到时间',
        key: 'enterTime',
        align: 'left',
        minWidth: 200
    }, {
        title: '离店时间',
        key: 'leaveTime',
        align: 'left',
        minWidth: 200
    }, {
        title: '到店时长',
        key: 'durationOfStay',
        align: 'left',
        minWidth: 150
      }, {
        title: '门店维护人',
        key: 'storeMaintainerName',
        align: 'left',
        minWidth: 150
      }, {
        title: '打卡人',
        key: 'operatorName',
        align: 'left',
        minWidth: 200
    }, {
        title: '操作',
        key: 'matchQuantity',
        align: 'right',
        minWidth: 100,
        render: (h, params) => {
          return (
            <div>
              {renderButton(h, {text: '详情', type: 'primary'}, () => {bus.$emit("onDetail", {row: params.row})})}
            </div>
          )
        }
    }],
    data:[]
}
export default data